package org.millioncall.yueyoga.admin.dao;

import java.util.List;
import java.util.Map;

import org.millioncall.openplatform.common.PaginatedList;
import org.millioncall.yueyoga.admin.model.Resource;

/**
 * 资源DAO类
 * 
 * @author zangjinyu
 * @version 1.0.0
 * @since 2014-3-28
 * 
 */
public interface ResourceDAO {
	/**
	 * 根据权限authority查询此权限所拥有的资源
	 * 
	 * @param authority
	 * @return
	 */
	public List<Resource> findResourceByAuthorityId(Integer authorityId);
	
	public PaginatedList<Resource> findAllResources(int start, int limit,
			Map<String, String> map);

	public int deleteResources(List<Integer> rIds);

	public int saveResource(Resource resource);

	public int updateResource(Resource resource);

	public List<Resource> findResources(boolean b);
	
	public Resource findResourceByName(String name);
}
